package com.fg.pro.model.trade.dto;

import lombok.Data;

import java.util.List;

@Data
public class GmCustomerDto {

    @Data
    public class GmCustomerRequest {

        public Page paging;

        public GmCustomerRequest gmCustomerRequest(int limit) {
            Page page = new Page();
            page.setLimit(limit);
            GmCustomerRequest gmCustomerRequest = new GmCustomerRequest();
            gmCustomerRequest.setPaging(page);
            return gmCustomerRequest;
        }

        @Data
        public class Page {
            public int limit;
        }
    }

    @Data
    public class GmCustomerReponse {
        public List<CustomerData> customers;

        @Data
        public class CustomerData {
            public Long customer_id;
            public Integer status;
            public Long create_time;
            public Long update_time;
            public Long group_id;
            public Long parent_id;
            public String name;
            public String customized_code;
            public Integer type;
            public Boolean is_reviewed;
            public Boolean is_in_whitelist;
            public Integer level;
            public Settlement settlement;
            public Integer settlement_method;
            public Integer credit_type;
            public Long city_id;
            public Long district_id;
            public Long street_id;
            //属性主要是地址属性
//        public Attrs attrs;
            public Long warehouse_id;
            //        public customer_order_limit customer_order_limit;
            public Integer have_purchase_rule;
            public Integer is_vip_customer;
            public Integer discount_rate;

            @Data
            public class Settlement {
                public Integer date_dimension;
                public Integer settle_period;
                public Integer weekly_or_monthly_credit_start_day;
                public Integer weekly_or_monthly_credit_settle_day;
                public Integer weekly_or_monthly_credit_deley_days;
                public Double unpay_amount;
                public Double available_amount;
                public ChinaVatInvoice china_vat_invoice;

                @Data
                public class ChinaVatInvoice {
                    public String company_name;
                    public String financial_contact_name;
                    public String financial_contact_phone;
                }
            }
        }


    }

}
